package com.sailorj.mapper;

import com.sailorj.entity.TbLab;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TbLabMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TbLab record);

    int insertSelective(TbLab record);

    TbLab selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TbLab record);

    int updateByPrimaryKey(TbLab record);

    @Select("select * from tb_lab where is_delete = 0 limit #{page},#{size}")
    List<TbLab> selectLabList(@Param("page") Integer page, @Param("size")Integer size);

    @Select(value = "select * from tb_lab t where t.lab_name=#{labName} and is_delete = 0 ")
    TbLab findLabByName(String name);

    @Select("select count(*) from tb_lab")
    Long getTotal();
}